package com.doit.day05

object _05_现象小观察 {
  def main(args: Array[String]): Unit = {

    val list: List[Int] = List(1, 2, 3, 4, 5)

    val list1: List[Int] = list.map(a => {
      println("晶晶 大美女")
      a * 10
    })//为什么这个hello 被打印出来了 5遍

    val iter: Iterator[Int] = list.iterator

    val ints: Iterator[Int] = iter.map(a => {
      println("晶晶 大美女")
      a * 3
    })

    val ints1: Iterator[Int] = ints.filter(a => {
      println("方方大美女")
      a % 2 == 0
    })

    ints1.foreach(println)





  }

}
